#include("/static/themes/perfree/layout/layout.html")
#@layout()
#define content()
<div class="m-article-list">
    #articlePage(pageSize=10)
    #for(article: articlePage.data)
    <div class="m-article-box">
        #if(article.thumbnail != null && article.thumbnail != "")
        <div class="m-article-img-box">
            <div class="m-article-img" style="background-image: url('#(article.thumbnail)')"></div>
        </div>
        #end
        <div class="m-article-container">
            <div class="m-article-title-box">
                #if(article.isTop == 1)
                    <span class="layui-badge m-top">置顶</span>
                #end
                <a href="#(article.url)" class="m-article-title"><h2>#(article.title)</h2></a>
            </div>
            <article class="m-article-content">#mdSummary(article.content,200)...</article>
            <hr color="#e1e4e6" SIZE="1">
            <div class="m-article-info-box">
                <div class="m-article-info-left">
                    <span class="m-article-info-btn"><i class="fa fa-eye"></i> #(article.viewCount ??)</span>
                    <span class="m-article-info-btn"><i class="fa fa-comment-o"></i> #(article.commentCount ??)</span>
                    <span class="m-article-info-btn"><i class="fa fa-user-o"></i> #(article.user.userName ??)</span>
                    <span class="m-article-info-btn"><i class="fa fa-clock-o"></i> #date(article.createTime, "yyyy-MM-dd")</span>
                </div>
                <div class="m-article-info-right">
                    <a class="m-read-more" href="#(article.url)">阅读更多</a>
                </div>
            </div>
        </div>
    </div>
    #else
        <div class="m-no-article">这里一篇文章都没有呢</div>
    #end
    #pageRender(articlePage, preText="上一页",nextText="下一页")
    #end
</div>
#end